var app = getApp();
Page({

  /**
   * 页面的初始数据
   */
  data: {
    fxnr: null
  },
  onLoad: function () {
    let that = this;
    if (app.globalData.fxnr == null) {
      wx.request({
        url: app.globalData.url + "ndzscs/request1/mains.php",
        method: "GET",
        header: {
          "content-type": "application/json"
        },
        success: function (e) {
          that.setData({
            fxnr: e.data
          })
        },
      })
    } else {
      that.setData({
        fxnr: app.globalData.fxnr
      })
    }//获取发现内容
  },
  onShareAppMessage: function () { //分享代码
    return {
      title: "这里有好多有趣的文章，快来阅读一下吧！",
      path: "/pages/articles/articles"
    };
  },
  onPullDownRefresh: function () {
    this.onLoad();
    wx.stopPullDownRefresh();
  },
  onShow: function () {
    this.onLoad();
  },
  kscs: function (t) {
    var o = t.currentTarget.dataset.index;
    wx.navigateTo({
      url: "/pages/ceshi/ceshi?tm=" + this.data.fxnr[o][1] + "&tp=" + this.data.fxnr[o][4] + "&bjtp=" + this.data.fxnr[o][5] + "&xxjs=" + this.data.fxnr[o][3] + "&num=" + this.data.fxnr[o][0] + "&xpzcs=0" + "&zdy=" + this.data.fxnr[o][7] + "&csrs=null",
    });
  }
})